<!doctype html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">  
    <title>WeAppViews</title> 
    <link href="icons/css/font-awesome.min.css" rel="stylesheet"> 
   	<link href="styles.css" rel="stylesheet">
    <style type="text/css">
    	body{padding:0px;margin:0px}
     
    </style>
    <script type="text/javascript" language="javascript" src="unittest/unittest.nocache.js"></script>
  </head>  
  <body> 
  	<p>请使用Chrome系浏览器并打开开发者工具和控制台，查看测试结果</p>
 	<script type="text/javascript">
 		 window.addEventListener("load",function(){

 			 {
  				var ut = new UnitTest("全部通过单元测试 1",true);
  	 			assertTrue("测试 Boolean ",true);  
  	 			assertEquals("测试  String 123 ","123","123"); 
  	 			assertEquals("测试  number ",123,123); 
  	 			assertEquals("测试  数字 ",123,123); 
  	 			ut.finish();
  			 }
 			 {
 				var ut = new UnitTest("无界面测试 (在控制台显示)");
 	 			Asserts.assertTrue("测试 Boolean ",true);
 	 			assertTrue("测试 Boolean ",false);
 	 			assertTrue("测试 Boolean ",true);
 	 			assertEquals("测试  String 123 ","123","123");
 	 			Asserts.assertEquals("测试  String 1234","123","1234");
 	 			Asserts.assertEquals("测试  number ",123,123);
 	 			Asserts.assertEquals("测试  Object ",{},{});
 	 			ut.finish();
 			 }
 			 {
  				var ut = new UnitTest("在页面显示测试 ",true);
  	 			Asserts.assertTrue("测试 Boolean ",true);
  	 			assertTrue("测试 Boolean ",false);
  	 			assertTrue("测试 Boolean ",true);
  	 			assertEquals("测试  String 123 ","123","123");
  	 			assertEquals("测试  String 1234","123","1234");
  	 			assertEquals("测试  number ",123,123);
  	 			assertEquals("测试  Object ",{},{}); 
  	 			ut.finish();
  			 }{
  				var ut = new UnitTest("测试UI组件",true);
  	 			Asserts.assertTrue("测试 Boolean ",true);
  	 			assertTrue("测试 Boolean ",false);
  	 			assertTrue("测试 Boolean ",true);
  	 			assertEquals("测试  按钮组件 ","123","123");
  	 			ut.pageEl().innerHTML="<button>被测试的组件1</button>";
  	 			assertEquals("测试  String 1234","123","1234");
  	 			assertEquals("测试  按钮组件 ",123,123);
  	 			ut.pageEl().innerHTML="<button>被测试的组件2</button> <button>被测试的组件3</button>";
  	 			Asserts.assertEquals("测试  Object ",{},{});
  	 			ut.pageEl().innerHTML="<div style=\"border:1px solid #999;background:#eee;padding:18px\"><button>被测试的组件4</button><br/><br/><button>被测试的组件4</button></div>";
  	 			ut.pageEl().innerHTML="UI组件测试结果";
  	 			ut.finish();
  			 }
 			 {
  				var ut = new UnitTest("全部通过单元测试 2",true);
  	 			assertTrue("测试 Boolean ",true);  
  	 			assertEquals("测试  String 123 ","123","123"); 
  	 			assertEquals("测试  number ",123,123); 
  	 			assertEquals("测试  数字 ",123,123); 
  	 			ut.finish();
  			 }
 		 }); 
 	</script>
  </body>
</html>
